import request from "../../utils/request.js"
const state = {
	homeData:[],
	lastData:[]
}
const mutations = {
	SET_HOMEDATA(state,homeData){
		state.homeData = homeData
	},
	SET_LASTDATA(state,lastData){
		state.lastData = lastData
	}
}
const actions = {
	async getHomeData({commit}){
		const result = await request('/getIndexData')
		commit('SET_HOMEDATA',result)
	},
	async getLastData({commit}){
		const result = await request('/getIndexCateList')
		commit('SET_LASTDATA',result)
	}

}
const getters = {

}
export default {
	state,
	mutations,
	actions,
	getters
}